function img_norm=normalize(img)
      img_norm=zeros(size(img,1),size(img,2));
      min1=min(min(img(30:end-30,30:end-30)));
      max1=max(max(img(30:end-30,30:end-30)));
      img_norm(30:end-30,30:end-30)=((img(30:end-30,30:end-30)-min1))./(max1-min1);
      
      min1=min(min(img(1:30,end-30:end)));
      max1=max(max(img(1:30,end-30:end)));
      img_norm(1:30,end-30:end)=((img(1:30,end-30:end)-min1))./(max1-min1);
end